home *** CD-ROM | disk | FTP | other *** search
/ Atari Mega Archive 2 / Atari Mega Archive CD - Volume 2.iso / 8bit / cislib_b / sparky.txt < prev    next >
Text File  |  1995-04-22  |  3KB  |  1 lines

  1. 0100 ;sparky.m650110 ;Bill Aycock 3-870120 ;0130 ;0140 ;Allow a SpartaDOS command-line0150 ;argument for the extension of0160 ;the PFKEYS macro definition0170 ;file for SuperKEY! to load0180 ;(i.e. use PFKEYS.xxx)0190 ;0200 ;0210 ;The original SUPKEY.COM had a0220 ;separate segment with the0230 ;starting RTS to avoid re-entry0240 ;but I've moved that to be the0250 ;first byte of the SUPKEY code.0260 ;0270 ;What was originally an INIT0280 ;vector I have changed to a0290 ;RUN vector; that way, I can0300 ;use the INIT vector for my0310 ;code.0320 ;0330 ;Current values:0340 ;0350 ; SUPKEY start: $51D20360 ;        end:   $54BB0370 ; SPARKY start: $54BC0380 ;        end:   $55150390 ; run vector:   $52F30400 ; init vector:  $54DE0410 ;0420 ;0430 ;If you have any questions,0440 ;contact me at 76703,4061.0450 ;0460 ;0470 ;------------------------------0480 ;0490 ;start code right after SUPKEY0500 ;so it is all in one segment0510 ;0520 ;0530     *=  $54BC0540 ;0550 ;0560 ;------------------------------0570 ;0580 ; --- E Q U A T E S ---0590 ;0600 ;0610 ZCR .WORD 0     ;get an arg0620 CFN .WORD 0     ;arg buffer0630 SAV .WORD 0     ;save ptr0640 PTR =   $A0     ;use as pointer0650 DOSVEC = $0A    ;addr of COMTAB0660 FN  =   $53CA   ;PFKEYS ext0670 NOTOK = $5498   ;not-ok msg0680 ;0690 ;0700 ;------------------------------0710 ;0720 FIXPTRS0730 ;0740 ;Set up zcr and cfn to point to0750 ;SpartaDOS's get-an-arg routine0760 ;(ZCRNAME) and argument buffer0770 ;(COMFNAM). We will skip 3 bytes0780 ;of COMFNAM since ZCRNAME always0790 ;adds a device spec to an arg.0800 ;0810 ;0820     LDA DOSVEC+1 ;zcr=comtab+30830     STA ZCR+10840     LDA DOSVEC0850     CLC 0860     ADC #30870     BCC OK10880     INC ZCR+10890 OK10900     STA ZCR0910 ;0920     LDA DOSVEC+1 ;cfn=comtab+330930     STA CFN+10940     LDA DOSVEC0950     CLC 0960     ADC #36     ;skip 3 extra0970     BCC OK20980     INC CFN0990 OK21000     STA CFN1010     RTS 1020 ;1030 ;1040 ;------------------------------1050 ;1060 CALLZ1070 ;1080 ;fake an indirect JSR (ZCRNAME)1090 ;by using JSR CALLZ1100 ;1110 ;1120     JMP (ZCR)1130 ;1140 ;1150 ;-------------------------------1160 ;1170 FIXEXT1180 ;1190 ;Check for a PFKEYS extension1200 ;on the cmd line, hack it1210 ;into the SUPKEY code (just1220 ;use '.DAT' if not found).1230 ;1240     JSR FIXPTRS1250     JSR CALLZ1260     BEQ QUIT    ;z set=no args1270 ;1280     LDA PTR     ;save ptr val1290     STA SAV1300     LDA PTR+11310     STA SAV+11320     LDA CFN     ;set up pointer1330     STA PTR1340     LDA CFN+11350     STA PTR+11360 ;1370     LDY #01380 MORE1390     LDA (PTR),Y ;get the ext and1400     STA FN,Y    ;hack the bytes1410     STA NOTOK,Y1420     INY 1430     CPY #3      ;just 3 bytes1440     BNE MORE1450 QUIT1460     RTS 1470 ;1480 ;1490 ;------------------------------1500 ;1510 ;and finally the init vector1520 ;1530     *=  $02E21540 ;1550 INITVEC .WORD FIXEXT1560 ;1570 ;and that's all!1580 ;1590     .END 66666666666666666666666666666666666666666666666666666666666666666666666666